package com.kefu.boss.vo;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.kefu.boss.model.BossMenu;
import com.kefu.common.vo.AbstractInsertVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;

@Data
@ApiModel
public class BossMenuInsertVo extends AbstractInsertVo<BossMenu> {
    @ApiModelProperty(name = "id", value = "主键")
    private String id;

    /**
     * 上级
     */
    @ApiModelProperty(name = "parentId", value = "上级")
    private String parentId;

    /**
     * 菜单名称
     */
    @ApiModelProperty(name = "name", value = "菜单名称")
    private String name;

    /**
     * 排序
     */
    @ApiModelProperty(name = "weight", value = "排序")
    private Integer weight;

    /**
     * 前端标识
     */
    @ApiModelProperty(name = "path", value = "前端标识")
    private String path;
    /**
     * 是否隐藏
     */
    @ApiModelProperty(name = "hidden", value = "是否隐藏")
    private Integer hidden;
    /**
     * 类型
     */
    @ApiModelProperty(name = "type", value = "类型")
    private String type;
    /**
     * 组件
     */
    @ApiModelProperty(name = "component", value = "组件")
    private String component;

    /**
     * 重定向
     */
    @ApiModelProperty(name = "redirect", value = "重定向")
    private String redirect;

    /**
     * 后端标识
     */
    @ApiModelProperty(name = "icon", value = "图标")
    private String icon;

    @Override
    public BossMenu convert() {
        BossMenu info = BeanUtil.toBean(this, BossMenu.class);
        return info;
    }
}
